package com.hezhi.project.module.machineRecord.controller;

import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.hezhi.project.module.machineRecord.domain.MachineRecord;
import com.hezhi.project.module.machineRecord.service.IMachineRecordService;
import com.hezhi.framework.web.controller.BaseController;
import com.hezhi.framework.web.page.TableDataInfo;

/**
 * 闸机下发记录 信息操作处理
 * 
 * @author hezhi
 * @date 2018-08-10
 */
@Controller
@RequestMapping("/module/machineRecord")
public class MachineRecordController extends BaseController
{
    private String prefix = "module/machineRecord";
	
	@Autowired
	private IMachineRecordService machineRecordService;
	
	@RequiresPermissions("module:machineRecord:view")
	@GetMapping()
	public String machineRecord()
	{
	    return prefix + "/machineRecord";
	}
	
	/**
	 * 查询闸机下发记录列表
	 */
	@RequiresPermissions("module:machineRecord:list")
	@PostMapping("/list")
	@ResponseBody
	public TableDataInfo list(MachineRecord machineRecord)
	{
		startPage();
        List<MachineRecord> list = machineRecordService.selectMachineRecordList(machineRecord);
		return getDataTable(list);
	}
	
}
